// pages/ruleDetail/ruleDetail.js
Page({
  data: {
    title: '',
    content: ''
  },

  onLoad(options) {
    const title = options && options.title ? decodeURIComponent(options.title) : '协议详情'
    this.setData({ title })
    wx.setNavigationBarTitle({ title })
    const channel = this.getOpenerEventChannel && this.getOpenerEventChannel()
    if (channel) {
      channel.on('ruleContent', ({ content = '' } = {}) => {
        this.setData({ content })
      })
    }
  }
})

